package com.chinasoft.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;



@Component
@Aspect
@Order(1)
public class AOPAdvice {

//    @Before("AOPPointCut.pt1()")
//    public void before(){
//        System.out.println("before ... ");
//    }
//
//    @After("AOPPointCut.pt1()")
//    public void after(){
//        System.out.println("after ... ");
//    }
//
//    @AfterReturning("AOPPointCut.pt1()")
//    public void afterReturning(){
//        System.out.println("AfterReturning ... ");
//    }
//
//    @AfterThrowing("AOPPointCut.pt1()")
//    public void afterThrowing(){
//        System.out.println("afterThrowing ... ");
//    }

//    @Around("AOPPointCut.pt1()")
//    public Object around(ProceedingJoinPoint pjp) throws Throwable {
//        System.out.println("around  before ... ");
//        Object ret = pjp.proceed();
//        System.out.println("around  after ... ");
//        return ret;
//    }

}